import instance from '../utils/request';

// 获取商品列表
export const getGoodsList = (params) => {
  return instance.get('/api/products/list', { params });
};

// 添加商品
export const addGoods = (data) => {
  return instance.post('/api/products/add', data);
};

// 删除商品
export const deleteGoods = (id) => {
  return instance.delete(`/api/products/delete/${id}`);
};

// 更新商品
export const updateGoods = (id, data) => {
  return instance.post(`/api/products/update/${id}`, data);
};
